package cn.jellybmedia.org.domain;
/**
* @Description: 部门表
* @Author: Mr.She
* @Version: 1.0
* @Date:  2022/6/21 18:11
*/

import cn.jellybmedia.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain{

    // 部门层级
    private String sn;
    // 是否开启. 1开启 0关闭
    private Integer state;
    // 部门路径
    private String dirPath;
    // 部门名称
    private String name;
    // 上级部门id
    private Long parentId;
    // 经理id
    private Long managerId;

    // 高级查询的部门经理字段,引入员工表对象
    private Employee manager;

    // 高级查询的上级部门字段,引入部门表
    private Department parent;

    // 获取部门树
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();


}
